<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:layout="http://www.w3.org/1999/xhtml"
      layout:decorator="inc/layout"
>
<head>
    <meta charset="UTF-8"/>
    <title>课程</title>
    <style>
        .mycode * {
            margin: 0;
            padding: 0;
            font-size: 16px;
        }

        .mycode blockquote {
            height: 30px;
            line-height: 30px;
            border-left: 8px solid #d0e5f2;
            text-indent: 6px;
            background: #f1f1f1;
            display: block;
            margin: 10px 0;
            font-size: 16px;

        }

        .mycode pre code {
            display: block;
            color: inherit;
        }

        .mycode code {
            color: #c7254e;
            font-size: 13px;
            line-height: 1.5;
            padding: 5px 8px;
            background-color: #f1f1f1;
            border-radius: 3px
        }

        .mycode p {
            margin: 10px 8px;
            line-height: 1.5;
            font-size: 16px
        }

        .mycode li {
            font-size: 15px;
            line-height: 16px;
            margin-left: 25px;
        }

        .mycode li p {
            font-size: 14px;
            margin-left: 2px;
            line-height: 14px
        }

        .true {
            color: #2b542c;
        }


    </style>
    <script>
        function daShang() {
            layer.open({
                type: 2,
                title: '打赏',
                shade: 0.8,
                area: ['520px', '290px'],
                content: ctxPath + 'img/dashang.jpg', //iframe的url

            })

        }
    </script>


</head>

<body>
<div class="container" layout:fragment="content">

    <div class="row">

        <div class="col-sm-3">
            <div class="panel panel-default">
                <div class="panel-heading " >
                    <i class="fa fa-sticky-note-o"></i>
                    <span th:text="${noteBook.name}"></span>
                </div>
                <div class="panel-body ">

                    <img th:src="${noteBook.img}" class="img-thumbnail center-block " width="30%" onerror="this.src='/img/noteBook/default.jpg'"/>

                </div>
                <div class="panel-footer text-center">
                    <a th:href="@{/}">返回主页</a>
                </div>
            </div>


        </div>
        <div class="col-sm-9">
            <div class=" panel panel-default">
                <div class="panel-body">
                    <div>
                        <div th:text="${noteBook.name}" class="h3 text-center text-capitalize"></div>
                        <div class="btn btn-warning" onclick="daShang()"><i class="fa fa-rmb"
                                                                            style="margin-right: 5px"></i>我要打赏
                        </div>
                        <span style="display: inline-block;margin-left: 50px">作者：
                            <span th:if="${noteBook.user!=null}" th:text="${noteBook.user.nickname}">

                            </span>
                            <span th:if="${noteBook.user==null}" >
                                管理员
                            </span>
                        </span>
                    </div>
                    <hr/>
                    <div class="mycode" th:utext="${noteBook.text}">
                    </div>
                </div>

            </div>
        </div>
    </div>

</div>
</body>
</html>